Cracking the Coding Interview. (2500+ Interview Que. & Ans.) by Harry - Anonymous Hacktivist
Author:Harry - Anonymous Hacktivist.
Language: eng
Format: epub
Tags: Cracking The Coding Interview, Cracking The Programming Interview, Cracking The Interview, Cracking The Java Interview, JOB Interview, Interview, JAVA Programming
Publisher: Harry & Associates.
Published: 2014-07-28T00:00:00+00:00
Question What does the "final" keyword mean in front of a variable? A method? A class? (Core Java)
Answer FINAL for a variable : value is constant.
FINAL for a method : cannot be overridden.
FINAL for a class : cannot be derived .
Question What is the difference between instanceof and isInstance?
Answer instanceof is used to check to see if an object can be cast into a specified type without throwing a cast class exception. isInstance() Determines if the specified Object is assignment-compatible with the object represented by this Class. This method is the dynamic equivalent of the Java language instanceof operator. The method returns true if the specified Object argument is non-null and can be cast to the reference type represented by this Class object without raising a ClassCastException. It returns false otherwise.
Question Why does it take so much time to access an Applet having Swing Components the first time? (Swing)
Answer Because behind every swing component are many Java objects and resources. This takes time to create them in memory. JDK 1.3 from Sun has some improvements which may lead to faster execution of Swing applications.
Question How do I include static files within a JSP page? (JSP)
Answer Static resources should always be included using the JSP include directive. This way, the inclusion is performed just once during the translation phase. The following example shows the syntax: Do note that you should always supply a relative URL for the file attribute. Although you can also include static resources using the action, this is not advisable as the inclusion is then performed for each and every request.
Question Why does JComponent have add() and remove() methods but Component does not? (Swing)
Answer because JComponent is a subclass of Container, and can contain other components and jcomponents.
Question How would you create a button with rounded edges? (Swing)
Answer There are 2 ways. The first thing is to know that a JButton?s edges are drawn by a Border. so you can override the Button?s paintComponent(Graphics) method and draw a circle or rounded rectangle (whatever), and turn off the border. Or you can create a custom border that draws a circle or rounded rectangle around any component and set the button?s border to it.
Question How would you detect a keypress in a JComboBox? (Swing)
Answer Add a KeyListener to the JComboBox?s editor component instead of adding a KeyListener to the JComboBox itself.
Question Why should the implementation of any Swing callback (like a listener) execute quickly? (Swing)
Answer Because callbacks are invoked by the event dispatch thread which will be blocked processing other events for as long as your method takes to execute.
Question Why would you use SwingUtilities.invokeAndWait or SwingUtilities.invokeLater? (Swing)
Answer I want to update a Swing component but I?m not in a callback. If I want the update to happen immediately (perhaps for a progress bar component) then I?d use invokeAndWait. If I don?t care when the update occurs, I?d use invokeLater.
Question If your UI seems to freeze periodically, what might be a likely reason? Answer A callback implementation like ActionListener.actionPerformed or MouseListener.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Business School Guides | GMAT |
Guides | Interviewing |
Job Hunting | Job Markets & Advice |
Resumes | Vocational Guidance |
Volunteer Work |
The Motivation Myth by Jeff Haden(4556)
Audition by Ryu Murakami(4134)
Adulting by Kelly Williams Brown(3710)
The Confidence Code by Katty Kay(3599)
Waiting in the Wings by Melissa Brayden(2822)
A Mind For Numbers: How to Excel at Math and Science (Even If You Flunked Algebra) by Barbara Oakley(2705)
Self-Esteem by Matthew McKay & Patrick Fanning(2623)
Nice Girls Don't Get the Corner Office by Lois P. Frankel(2611)
The ONE Thing by Gary Keller(2549)
The Dictionary of Body Language by Joe Navarro(2451)
Fooled by Randomness: The Hidden Role of Chance in Life and in the Markets by Nassim Nicholas Taleb(2438)
How to be More Interesting by Edward De Bono(2374)
Getting Things Done by David Allen(2334)
Designing Your Life by Bill Burnett(2294)
The Plant Paradox by Dr. Steven R. Gundry M.D(2065)
Police Exams Prep 2018-2019 by Kaplan Test Prep(2050)
What Color Is Your Parachute? 2015 by Richard N. Bolles(1943)
Dangerous Personalities by Joe Navarro(1903)
When to Jump by Mike Lewis(1815)